Next: ARM-Neon-Alignment, Previous: ARM-Regs, Up: ARM Syntax

##### 9.3.3.1 ARM relocation generation

Specific data relocations can be generated by putting the relocation name in parentheses after the symbol name. For example:

                 .word foo(TARGET1)

This will generate an ‘`R_ARM_TARGET1`’ relocation against the symbol foo. The following relocations are supported: `GOT`, `GOTOFF`, `TARGET1`, `TARGET2`, `SBREL`, `TLSGD`, `TLSLDM`, `TLSLDO`, `GOTTPOFF`, `GOT_PREL` and `TPOFF`.

For compatibility with older toolchains the assembler also accepts `(PLT)` after branch targets. This will generate the deprecated ‘`R_ARM_PLT32`’ relocation.

Relocations for ‘`MOVW`’ and ‘`MOVT`’ instructions can be generated by prefixing the value with ‘`#:lower16:`’ and ‘`#:upper16`’ respectively. For example to load the 32-bit address of foo into r0:

                 MOVW r0, #:lower16:foo
                 MOVT r0, #:upper16:foo